﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Loong.Domain.Uow;
using Loong.Events.Bus.Handlers;

namespace Loong.Orders
{
    public class OrderCreatedEventHandler : IAsyncEventHandler<OrderCreatedEventData>
    {
        private readonly IUnitOfWorkManager _unitOfWorkManager;

        public OrderCreatedEventHandler(IUnitOfWorkManager unitOfWorkManager)
        {
            _unitOfWorkManager = unitOfWorkManager;
        }

        public Task HandleEventAsync(OrderCreatedEventData eventData)
        {
            var uow = _unitOfWorkManager.Current;
            return Task.CompletedTask;
        }
    }
}
